#ifndef PROGRESSFORM_H
#define PROGRESSFORM_H

#include <QWidget>
#include <initializer_list>
#include <QFile>
#include <QTextStream>
#include <QStringList>
#include <QProcess>
#include <QTableWidgetItem>
#include <QDateTime>

#include <QMenu>
#include "ThreadRunner.h"


namespace Ui {
class ProgressForm;
}

class ProgressForm : public QWidget
{
    Q_OBJECT

public:
    explicit ProgressForm(QWidget *parent = nullptr);
    ~ProgressForm();


    void LoadProgressFromConf(std::string path);

    void SetAProgress(std::string app,bool detach,std::list<std::string> params);


    void StartByLine(int li,bool NotAllowGray = true);

    void SetOneRowDisable(int row);

public slots:
    /** Set process Status. **/
    void TaskFinishedRec(int row,QString r2,QString r3);
private slots:
    void on_pb_startByTable_clicked();

    /** Txt File .conf **/
    void on_pb_openConf_clicked();

    void on_pb_startCurrent_clicked();

    void onTableWidgetContextMenu(const QPoint &pos);


private:
    Ui::ProgressForm *ui;


    ThreadRunner runner;
};

#endif // PROGRESSFORM_H
